package edu.jd.movieplatform.security.login.impl;

import edu.jd.movieplatform.security.login.LoginDto;
import edu.jd.movieplatform.security.login.LoginService;
import edu.jd.movieplatform.security.login.dao.LoginDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service  @Transactional
public class LoginServiceImpl implements LoginService {

    @Resource
    private LoginDao loginDao;

    @Override
    public boolean checkLogin(LoginDto dto) {
        int cnt = loginDao.findCountByUserNameAndPwd(dto);
        return cnt>0;
    }
}
